<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改收款认领')" />
    <th:block th:include="include :: datetimepicker-css" />
    <th:block th:include="include :: select2-css" />
    <th:block th:include="include :: bootstrap-select-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-incoming-edit" th:object="${workIncoming}">
            <input name="incomingId" th:field="*{incomingId}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款人：</label>
                <div class="col-sm-8">
                    <input name="incomingName" th:field="*{incomingName}" class="form-control" type="text" required>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款银行：</label>
                <div class="col-sm-8">
                    <select name="bankName" class="form-control m-b" th:with="type=${@dict.getType('work_bank')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"
                                th:field="*{bankName}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款账号：</label>
                <div class="col-sm-8">
                    <input name="bankAccount" th:field="*{bankAccount}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">来款额度：</label>
                <div class="col-sm-8">
                    <input name="money" th:field="*{money}" class="form-control" type="text" required>
                </div>
            </div>
            <!--       <div class="form-group">
                      <label class="col-sm-3 control-label">返款金额：</label>
                      <div class="col-sm-8">
                          <input name="refund" th:field="*{refund}" class="form-control" type="text">
                      </div>
                  </div>
                  <div class="form-group">
                      <label class="col-sm-3 control-label">税金：</label>
                      <div class="col-sm-8">
                          <input name="taxes" th:field="*{taxes}" class="form-control" type="text">
                      </div>
                  </div>
                 <div class="form-group">
                      <label class="col-sm-3 control-label">已销额度：</label>
                      <div class="col-sm-8">
                          <input name="expenseLimit" th:field="*{expenseLimit}" class="form-control" type="text">
                      </div>
                  </div>-->
            <div class="form-group">    
                <label class="col-sm-3 control-label">来款日期：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="incomingDate" th:value="${#dates.format(workIncoming.incomingDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <textarea name="remark" class="form-control">[[*{remark}]]</textarea>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <th:block th:include="include :: select2-js" />
    <th:block th:include="include :: bootstrap-select-js" />
    <script th:inline="javascript">
        var prefix = ctx + "work/incoming";
        $("#form-incoming-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-incoming-edit').serialize());
            }
        }

        $("input[name='incomingDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>